package com.ts.api.manage.course;

import com.ts.framework.domain.cms.response.CoursePreviewResult;
import com.ts.framework.domain.course.*;
import com.ts.framework.domain.course.ext.CourseView;
import com.ts.framework.domain.course.ext.TeachplanNode;
import com.ts.framework.domain.course.request.CourseListRequest;
import com.ts.framework.domain.course.response.AddCourseResult;
import com.ts.framework.domain.course.response.CoursePublishResult;
import com.ts.framework.model.response.QueryResponseResult;
import com.ts.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@Api(tags = "课程管理接口", description = "负责课程管理增删改查,课程计划,营销信息,课程图片等功能")
public interface CourseControllerApi {

    @ApiOperation("查询课程计划")
    @ApiImplicitParam(name = "courseId", value = "课程Id", dataType = "String", paramType = "path")
    public TeachplanNode findTeachPlanByCourseId(String courseId);

    @ApiOperation("添加课程计划")
    @ApiImplicitParam(name = "teachplan", value = "课程计划对象", dataType = "Teachplan", paramType = "body")
    public ResponseResult addTeachplan(Teachplan teachplan);

    @ApiOperation("删除课程计划")
    @ApiImplicitParam(name = "courseId", value = "课程计划删除对象", dataType = "String", paramType = "path")
    public ResponseResult delTeachplan(String courseId);

    @ApiOperation("分页查询课程列表")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "页码", name = "page", paramType = "path", dataType = "int", required = true),
            @ApiImplicitParam(value = "每页显示条数", name = "size", paramType = "path", dataType = "int", required = true),
            @ApiImplicitParam(value = "CourseBase请求参数对象", name = "courseListRequest", paramType = "query", dataType = "CourseListRequest", required = false)
    })
    public QueryResponseResult findCourseListByPage(int page, int size, CourseListRequest courseListRequest);

    @ApiOperation("添加课程基础信息")
    @ApiImplicitParam(name = "courseBase", value = "课程对象", dataType = "CourseBase", paramType = "body")
    public AddCourseResult addCourseBase(CourseBase courseBase);

    @ApiOperation("查询课程基础信息")
    @ApiImplicitParam(name = "courseId", value = "课程id", dataType = "String", paramType = "path")
    public CourseBase findCourseBaseById(String courseId);

    @ApiOperation("更新课程基础信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "课程id", paramType = "path", dataType = "String", required = true),
            @ApiImplicitParam(name = "courseBase", value = "课程基础对象", paramType = "body", dataType = "CourseBase", required = false)
    })
    public ResponseResult updateCourseBase(String id, CourseBase courseBase);


    @ApiOperation("获取课程营销信息")
    @ApiImplicitParam(name = "courseId", value = "课程id", dataType = "String", paramType = "path")
    public CourseMarket getCourseMarketById(String courseId);

    @ApiOperation("更新课程营销信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "课程id", paramType = "path", dataType = "String", required = true),
            @ApiImplicitParam(name = "courseMarket", value = "课程营销对象", paramType = "body", dataType = "CourseMarket", required = false)
    })
    public ResponseResult updateCourseMarket(String id, CourseMarket courseMarket);


    @ApiOperation("添加课程图片")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "courseId", value = "课程id", dataType = "String"),
            @ApiImplicitParam(name = "pic", value = "课程图片", dataType = "String")
    })
    public ResponseResult addCoursePic(String courseId, String pic);

    @ApiOperation("获取课程图片")
    @ApiImplicitParam(name = "courseId", value = "课程id", dataType = "String")
    public CoursePic findCoursePic(String courseId);

    @ApiOperation("删除课程图片")
    public ResponseResult delCoursePic(String courseId);

    @ApiOperation("查询课程详情页面模型数据")
    @ApiImplicitParam(name = "courseId", value = "课程id", paramType = "path", dataType = "String", required = true)
    public CourseView getCourseView(String courseId);

    @ApiOperation("课程详情预览url")
    @ApiImplicitParam(name = "id", value = "课程id", paramType = "path", dataType = "String", required = true)
    public CoursePreviewResult coursePreview(String id);

    @ApiOperation("课程发布")
    @ApiImplicitParam(name = "id", value = "课程id", paramType = "path", dataType = "String", required = true)
    public CoursePublishResult coursePublish(String id);

    @ApiOperation("保存课程计划与视频的关联关系")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程计划与视频的关联对象",name = "teachplanMedia",dataType = "TeachplanMedia",required = true)
    })
    public  ResponseResult  saveTeachMedia(TeachplanMedia teachplanMedia);

}
